<!DOCTYPE html>
<html lang="en" dir="ltr" class="client-nojs">
<head>
<meta charset="UTF-8" />
<title>Tca correct - PanoTools.org Wiki</title>
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<meta name="generator" content="MediaWiki 1.23.6" />






<style media="screen" type="text/css" title="Screen style sheet"> @import url(manual.css); </style>

<style>a:lang(ar),a:lang(kk-arab),a:lang(mzn),a:lang(ps),a:lang(ur){text-decoration:none}
/* cache key: panotools_wiki:resourceloader:filter:minify-css:7:90730a7865ba4b50e0b837e1821ff0a3 */</style>



<!--[if lt IE 7]><style type="text/css">body{behavior:url("/skins/vector/csshover.min.htc")}</style><![endif]--></head>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-Tca_correct skin-vector action-view vector-animateLayout">
		
		
		<div id="content" class="mw-body" role="main">
			<a id="top"></a>
			
						<h1 id="firstHeading" class="firstHeading" lang="en"><span dir="auto">Tca correct</span></h1>
						<div id="bodyContent">
								<div id="siteSub">From PanoTools.org Wiki</div>
								
												
				<div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr"><p><b>tca_correct</b> is a command-line tool shipped with <a href="Hugin.html" title="Hugin">hugin</a> that can be used to automatically calculate lens chromatic aberration<a class="external" href="http://wiki.panotools.org/TCA">[*]</a> correction parameters.  Ideal sample photos would have a lot of contrast over the entire image area, little saturated colour and no blown highlights.
</p>
<h2><span class="mw-headline" id="Using_with_fulla">Using with fulla</span></h2>
<p><a href="Fulla.html" title="Fulla">fulla</a> is a command-line tool for correcting <a href="Lens_distortion.html" title="Lens distortion">lens distortion</a>, <a href="Vignetting.html" title="Vignetting">vignetting</a> and TCA<a class="external" href="http://wiki.panotools.org/TCA">[*]</a> (chromatic aberration). It is capable of applying the full panotools polynomial to the red and blue channels, thereby correcting any transverse chromatic aberration.
</p><p>First calculate some TCA correction parameters for a sample image, notice that I'm only going to bother optimising <i>b</i> and <i>v</i> parameters in the <a href="Lens_correction_model.html" title="Lens correction model">lens correction model</a>, you might get better results with the full <i>abcv</i> set of parameters:
</p>
<pre> tca_correct -o bv DSC_3194.ppm
</pre>
<p>This outputs some fulla parameters like so:
</p>
<pre> -r 0.0000000:0.0001197:0.0000000:0.9997630 -b 0.0000000:-0.0001142:0.0000000:1.0001841
</pre>
<p>You can now use these with fulla when converting photos from this lens:
</p>
<pre> fulla -r 0.0:0.0001197:0.0:0.9997630 -b 0.0:-0.0001142:0.0:1.0001841 -o corrected.tif DSC_3194.ppm
</pre>
<h2><span class="mw-headline" id="Using_with_dcraw">Using with dcraw</span></h2>
<p>dcraw<a class="external" href="http://wiki.panotools.org/Dcraw">[*]</a> is a command-line <a href="RAW.html" title="RAW">RAW</a> converter with the ability to apply scaling of red/blue channels at the Bayer interpolation stage. Simple scaling is not as sophisticated as the panotools polynomial used in <a href="Fulla.html" title="Fulla">fulla</a> but is good enough for nearly all purposes. Start by extracting a test image from a RAW file:
</p>
<pre> dcraw DSC_3194.NEF
</pre>
<p>Then run <b>tca_correct</b> on this PPM image, but tell it to only optimise <i>v</i> field of view<a class="external" href="http://wiki.panotools.org/Field_of_view">[*]</a> for the red and blue channels:
</p>
<pre> tca_correct -o v DSC_3194.ppm
</pre>
<p>After a while some <a href="Fulla.html" title="Fulla">fulla</a> correction parameters will be outputted:
</p>
<pre> -r 0.0000000:0.0000000:0.0000000:1.0005943 -b 0.0000000:0.0000000:0.0000000:1.0008306
</pre>
<p>The two useful numbers (1.0005943 and 1.0008306) are the inverse of the numbers required by dcraw, so get a calculator and calculate the reciprocal of each:
</p>
<pre> 1 / 1.0005943 = 0.999406
 1 / 1.0008306 = 0.999170
</pre>
<p>Now when converting RAW files from this lens you can use the dcraw -C parameter to correct TCA<a class="external" href="http://wiki.panotools.org/TCA">[*]</a>:
</p>
<pre> dcraw -C 0.999406 0.999170 [OPTIONS...] DSC_3194.NEF
</pre>



</div>								<div class="printfooter">
				Retrieved from "http://wiki.panotools.org/index.php?title=Tca_correct&amp;oldid=11191<a class="external" href="http://wiki.panotools.org/index.php?title=Tca_correct&amp;oldid=11191">[*]</a>"				</div>
												</div></div></body></html>